package cn.edu.neu.softlab633.influencemaximization.sy;

import cn.edu.neu.softlab633.influencemaximization.sy.HighDegree_Algorithm.HighDegree;
import cn.edu.neu.softlab633.influencemaximization.sy.bean.Graph;
import cn.edu.neu.softlab633.influencemaximization.sy.datapreprocessing.ConstantTopic;
import cn.edu.neu.softlab633.influencemaximization.sy.input.GraphReader;

import java.io.IOException;

/**
 * Created by Jason on 2017/5/20.
 */
public class HighDegreeMain {
    public static void main(String[] args) throws IOException {
        String g1_filepath = "data/WZ/zhihurelation_topic.csv";
        String g2_filepath = "data/WZ/weiborelation_topic_new.csv";
        String alignment_filepath = "data/WZ/z_w_topic_new.csv";
        Double[] query = new Double[ConstantTopic.topicNum];
        for (int i = 0; i < ConstantTopic.topicNum; i++) {
            query[i] = 0.0;
        }
        query[0] = 1.0;
        double threshold = 0.7;
        int k = 100;
        int p = 10;
        long start = System.currentTimeMillis();
        System.out.println("读取文件");
        Graph graph = GraphReader.readGraphFromCSV(g1_filepath, g2_filepath, alignment_filepath);
//        Graph graph = GraphReader.graphReaderTest();
        long end = System.currentTimeMillis();
        System.out.println("    建立索引消耗时间：" + (end - start) + "毫秒");
        HighDegree.getSeed(threshold, query, k, graph);
    }
}
